using System;
using Microsoft.SPOT;
using OST.Shared.SharedTypes;

namespace OST.Shared.Interfaces
{
    /// <summary>
    /// interface for configuration provider
    /// </summary>
    public interface IConfigurationProvider : INotifyPropertyChanged
    {
        /// <summary>
        /// initializes the instance-for the concrete-configuration-provider-instance
        /// </summary>
        void Initialize();

        /// <summary>
        /// actual config-instance
        /// </summary>
        Configuration ConfigInstance { get; set; }

        /// <summary>
        /// flag, checks if a config-instance is available
        /// </summary>
        bool HasConfig { get; }

        /// <summary>
        /// flag, checks if the actual config is applid
        /// </summary>
        bool IsConfigApplied { get; }

        /// <summary>
        /// manual trigger to read config
        /// </summary>
        void ReadConfiguration();

        /// <summary>
        /// persists the actual config
        /// </summary>
        void SaveConfiguration();

        /// <summary>
        /// Applies actual specified logging configuration
        /// </summary>
        void Apply();
    }
}
